package com.silverbox.sweeporder.service.webmsg;

import com.silverbox.core.result.CoreResponse;
import com.silverbox.core.result.CoreResponse.StatusInfo;
import com.silverbox.shopper.entity.DiningArea;
import com.silverbox.sweeporder.controller.msg.vo.SendMsgEntryVO;
import com.silverbox.waimai.entity.MsgRecord;
import com.silverbox.waimai.entity.Waimai;

public interface WebMsgService {

	/**
	 * 后台完成支付发送消息给店铺
	 * 
	 * @param order
	 * @param machineId
	 * @param msgType
	 * @param aliyunMqtt
	 * @param hostMachineId
	 * @param msgCode 
	 */
	void sendWebMsg(Waimai order, Long machineId, int msgType, Integer aliyunMqtt, Long hostMachineId, String msgCode);
	
	/**
	 * 前端js发送消息给店铺后，再调用后台接口发送极光推送至商家APP、平板等
	 * 
	 * @param msg
	 * @param storeId
	 */
	void sendMsg(SendMsgEntryVO sendMsgEntry);
	
	/**
	 * 保存后付下单/加菜、先付支付的消息
	 * @param sweepPayPrint
	 * @param waimai
	 * @param tableInfo
	 * @param object
	 * @param msgCode
	 */
	MsgRecord saveAddWaimaiMsgRecord(Integer sweepPayPrint, Waimai waimai, DiningArea tableInfo, Long hostMachineId,
			String msgCode);
	
	/**
	 * 测试消息保存（可注释）
	 * @param sendMsgEntry
	 */
	CoreResponse<StatusInfo> saveMsg(String orderNum, Integer times, Long hostMachineId);
	
	/**
	 * 测试消息删除
	 * @param storeId
	 * @param machineId
	 * @return 
	 */
	CoreResponse<StatusInfo> deleteMsg(Integer storeId, Long machineId);
}